Semantic query language

ABSTRACT

Various technologies described herein pertain to executing a mixed query to search a database retained in a data repository. The mixed query includes a regular expression, which is a pattern of elements, and a semantic constraint. The elements in the regular expression include a first wildcard, where the semantic constraint restricts a meaning of the first wildcard. Moreover, the elements in the regular expression include explicit lexical constraint(s) and/or disparate wildcard(s). For instance, semantic constraint(s) can restrict meaning(s) of the disparate wildcard(s). The mixed query is executed to retrieve results that match the pattern of the elements in the regular expression and satisfy the semantic constraint(s).

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.13/594,883, filed on Aug. 27, 2012, and entitled “SEMANTIC QUERYLANGUAGE”, the entirety of which is incorporated herein by reference.

BACKGROUND

Regular expressions are commonly utilized to search a database. Aregular expression, for instance, can be employed to find text in adatabase that matches a string of text. Thus, the regular expression canbe evaluated to return matching strings of text from the database.

According to an example, a regular expression can be generated to searchfor the string of text “travel to the store” in a database. Followingthis example, sentence(s) that include the string of text “travel to thestore” can be returned responsive to the foregoing exemplary regularexpression. However, when using a regular expression to search adatabase, strings with similar meanings (e.g., “travel to the market”instead of “travel to the store”) are typically missing in the resultsreturned responsive to execution of the regular expression.

SUMMARY

Described herein are various technologies that pertain to executing amixed query to search a database retained in a data repository. Themixed query includes a regular expression, which is a pattern ofelements, and a semantic constraint. The elements in the regularexpression include a first wildcard, where the semantic constraintrestricts a meaning of the first wildcard. Moreover, the elements in theregular expression include explicit lexical constraint(s) and/ordisparate wildcard(s). For instance, semantic constraint(s) can restrictmeaning(s) of the disparate wildcard(s). The mixed query is executed toretrieve results that match the pattern of the elements in the regularexpression and satisfy the semantic constraint(s). Accordingly, themixed query can be utilized to search the database for results thatmatch a specified query in meaning.

According to various embodiments, the mixed query can further includesyntactic constraint(s) that can restrict grammar of wildcard(s) (e.g.,one or more of the first wildcard and the disparate wildcard(s), etc.)included in the regular expression. Accordingly, the mixed query can beexecuted to retrieve results that match the pattern of the elements inthe regular expression and satisfy the semantic constraint(s) and thesyntactic constraint(s).

According to some embodiments, results returned responsive to mixedqueries can be utilized in various applications. By way of example, theresults can be utilized as part of an interactive language tutoringapplication. Pursuant to yet another example, the results can beemployed as part of a question answering application.

In accordance with various embodiments, a mixed query can be iterativelygenerated. For instance, an initial mixed query can be constructed, anda refined mixed query can iteratively be constructed (e.g., manually bya user, etc.) responsive to results returned for a previous iteration ofthe mixed query. In accordance with another example, feedback pertainingto results undesirably retrieved in response to a previous query and/ormissing results can be utilized to automatically construct a refinedmixed query.

The above summary presents a simplified summary in order to provide abasic understanding of some aspects of the systems and/or methodsdiscussed herein. This summary is not an extensive overview of thesystems and/or methods discussed herein. It is not intended to identifykey/critical elements or to delineate the scope of such systems and/ormethods. Its sole purpose is to present some concepts in a simplifiedform as a prelude to the more detailed description that is presentedlater.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a functional block diagram of an exemplary systemthat searches a database retained in a data repository.

FIG. 2 illustrates a functional block diagram of an exemplary systemthat executes a mixed query to retrieve results from the databaseretained in the data repository.

FIG. 3 illustrates a functional block diagram of an exemplary systemthat implements an application that employs the mixed queries to searchthe database retained in the data repository.

FIG. 4 illustrates a functional block diagram of an exemplary systemthat iteratively generates the mixed query.

FIG. 5 is a flow diagram that illustrates an exemplary methodology ofsearching a database retained in a data repository.

FIG. 6 is a flow diagram that illustrates an exemplary methodology ofexecuting a mixed query.

FIG. 7 is a flow diagram that illustrates an exemplary methodology ofinteractively generating and executing a mixed query.

FIG. 8 illustrates an exemplary computing device.

DETAILED DESCRIPTION

Various technologies pertaining to executing a mixed query, whichincludes a regular expression and semantic constraint(s), to retrieveresults from a database retained in a data repository are now describedwith reference to the drawings, wherein like reference numerals are usedto refer to like elements throughout. In the following description, forpurposes of explanation, numerous specific details are set forth inorder to provide a thorough understanding of one or more aspects. It maybe evident, however, that such aspect(s) may be practiced without thesespecific details. In other instances, well-known structures and devicesare shown in block diagram form in order to facilitate describing one ormore aspects. Further, it is to be understood that functionality that isdescribed as being carried out by certain system components may beperformed by multiple components. Similarly, for instance, a componentmay be configured to perform functionality that is described as beingcarried out by multiple components.

Moreover, the term “or” is intended to mean an inclusive “or” ratherthan an exclusive “or.” That is, unless specified otherwise, or clearfrom the context, the phrase “X employs A or B” is intended to mean anyof the natural inclusive permutations. That is, the phrase “X employs Aor B” is satisfied by any of the following instances: X employs A; Xemploys B; or X employs both A and B. In addition, the articles “a” and“an” as used in this application and the appended claims shouldgenerally be construed to mean “one or more” unless specified otherwiseor clear from the context to be directed to a singular form.

As used herein, the terms “first,” “second,” and the like are notintended to denote an order. For example, if a regular expressionincludes a first wildcard and a second wildcard, it is contemplated thatthe first wildcard can be before or after the second wildcard in theregular expression. Moreover, it is contemplated that other elements canbe included between the first wildcard and the second wildcard in theregular expression (e.g., a third wildcard can be between the firstwildcard and the second wildcard, etc.). Further, the terms “first,”“second,” and the like are not intended to limit a number of instancesof an item. By way of example, if a regular expression is described asincluding a first wildcard, it is to be appreciated that such regularexpression can include substantially any number of wildcards (e.g., oneor more wildcards). Yet, the claimed subject matter is not limited tothe foregoing examples.

As set forth herein, a mixed query can be employed to search a databasefor results that match a specified query in meaning. The mixed queryincludes a regular expression and semantic constraint(s). The semanticconstraint(s) can restrict meanings of wildcard(s) included in theregular expression. The wildcard(s), for instance, can be wordwildcard(s) or phrase wildcard(s). The mixed query can be executed toretrieve results that match a pattern of elements in the regularexpression and satisfy the semantic constraint(s).

In some conventional approaches, a query can include a regularexpression and syntactic constraint(s). The syntactic constraint(s) canpertain to grammatical constructions. For example, a syntacticconstraint can restrict a corresponding wildcard included in the regularexpression to have a particular part of speech. Following this example,syntactic constraints can be used to specify that a first wildcard inthe regular expression is a noun and a second wildcard in the regularexpression is a verb.

In contrast to restricting the grammatical construction, semanticconstraint(s) included in the mixed queries disclosed herein pertain tomeaning. For instance, conventional approaches that use syntacticconstraint(s) without semantic constraint(s) can return a syntacticallycorrect sentence that is semantically incorrect. An example of such asentence is as follows: “Colorless green ideas sleep furiously.” In theforegoing sentence, the grammar is correct, whereas the semantics aremeaningless.

According to various embodiments set forth herein, a mixed query caninclude a regular expression, semantic constraint(s), and syntacticconstraint(s). As noted above, the semantic constraint(s) can restrictmeanings of wildcard(s) included in the regular expression. Further, thesyntactic constraint(s) can restrict grammar of wildcard(s) included inthe regular expression. For instance, the semantic constraint(s) and thesyntactic constraint(s) can restrict the same and/or differentwildcard(s). Moreover, the mixed query can be executed to retrieveresults that match a pattern of elements in the regular expression andsatisfy the semantic constraint(s) and the syntactic constraint(s).

Referring now to the drawings, FIG. 1 illustrates a system 100 thatsearches a database 102 retained in a data repository 104. The system100 includes an interface component 106 that receives a mixed query 108.The mixed query 108 includes a regular expression 110 and a semanticconstraint 112. Moreover, although not shown, it is contemplated thatthe mixed query 108 can include other semantic constraint(s) in additionto the semantic constraint 112. Further, although not depicted, it is tobe appreciated that the mixed query 108 can include syntacticconstraint(s).

The mixed query 108 can be utilized to search the database 102 forsentences that match a specified query in meaning. Accordingly, themixed query 108 can be formulated with two parts, namely, the regularexpression 110 and the constraint(s). The constraints can includesemantic constraint(s) (e.g., including the semantic constraint 112) andsyntactic constraint(s). The regular expression 110 is to match inresults 116 (e.g., matching sentences, etc.) that are returnedresponsive to the mixed query 108. Moreover, the semantic constraint(s)are restrictions on meanings (e.g., of corresponding wildcards) that areto be met by the results 116 that are returned. Accordingly, the system100 can use semantic constraint(s) in addition to the regular expression110 when querying the database 102, thereby enabling the database 102 tobe searched for sentences that match a specified query in meaning.Further, if included in the constraint(s), syntactic constraint(s) arerestrictions on grammatical construction (e.g., of correspondingwildcards) that are to be met by the results 116 that are returned.Thus, the syntactic constraint(s) can be used by the system 100 whenquerying the database 102 to search for sentences that match grammaticalconstruction of the specified query.

The regular expression 110 is a pattern of elements. An element, forexample, can be a constant word, a constant phrase, a word wildcard, ora phrase wildcard. Moreover, an element can be a constant string ofcharacters other than a constant word or a constant phrase. Yet, it isto be appreciated that the claimed subject matter is not so limited. Thepattern of elements in the regular expression 110 can be utilized toidentify a set of strings in the database 102.

According to various embodiments, the elements in the regular expression110 can include a first wildcard. The first wildcard can be a wordwildcard or a phrase wildcard. Moreover, the semantic constraint 112 canrestrict a meaning of the first wildcard in the regular expression 110.Further, the elements in the regular expression 110 can include explicitlexical constraint(s), disparate wildcard(s), a combination thereof, andthe like. An explicit lexical constraint in the regular expression 110can be a constant word or a constant phrase (or other constant string ofcharacters). Thus, the explicit lexical constraint is an explicit stringof characters included in the pattern in the regular expression 110.Moreover, a wildcard in the regular expression 110 can be a wordwildcard or a phrase wildcard.

The system 100 also includes a query execution component 114 (e.g.,query execution engine) that executes the mixed query 108. The queryexecution component 114 retrieves results 116 that match the pattern ofthe elements in the regular expression 110 and satisfy the semanticconstraint 112 (and disparate semantic constraint(s) and syntacticconstraint(s) if included in the mixed query 108). The results 116 canbe retrieved from the database 102 retained in the data repository 104(e.g., memory, data store, etc.). Moreover, the results 116 can beoutputted by the interface component 106. According to an illustration,the interface component 106 can output the results 116 to a disparatedatabase, a display screen (e.g., for display thereupon), or the like.

Semantic constraints (e.g., the semantic constraint 112, etc.) includedin the mixed query 108 restrict meanings of corresponding wildcards inthe regular expression 110. The following provides various examples ofsemantic constraint types. In the below examples, *w₁ is a wordwildcard, *p₁ is a phrase wildcard, and w₂ is a given word. However, itis contemplated that other semantic constraint types are intended tofall within the scope of the hereto appended claims.

For example, a semantic constraint can restrict a corresponding wildcardto be a synonym of a given word. For instance, Synonym(*w₁, w₂) meansthat the word wildcard *w₁ is restricted to be a synonym of the givenword w₂. By way of illustration, Synonym(*w₁, happy) restricts the wordwildcard *w₁ to be a synonym of the word “happy.”

According to another example, a semantic constraint can restrict acorresponding wildcard to be an antonym of a given word. For instance,Antonym(*w₁, w₂) means that the word wildcard *w₁ is restricted to be anantonym of the given word w₂. According to an illustration, Antonym(*w₁,far) restricts the word wildcard *w₁ to be an antonym of the word “far.”

In accordance with another example, a semantic constraint can restrict acorresponding wildcard to a sense of a given word. WordSense(*w₁, w₂,Sense) means that the word wildcard *w₁ is restricted to match thespecified Sense of the given word w₂. An illustration of this example isWordSense(*w₁, bridge, road); following this illustration, the wordwildcard *w₁ is restricted to have the sense of a road-bridge as opposedto other types of bridges (e.g., a dental-bridge, etc.).

According to yet another example, a semantic constraint 112 can restricta corresponding wildcard based on a negated semantic constraint (e.g.,not a synonym, not an antonym, etc.). For instance, Not(Synonym(*w₁,confused)) restricts the word wildcard *w₁ to not be a synonym of theword “confused.”

It is to be appreciated, however, that the claimed subject matter is notlimited to the foregoing semantic constraint types, and other semanticconstraint types are intended to fall within the scope of the heretoappended claims. For example, a semantic constraint, such asHasLocation(*p₁) can be used to restrict the phrase wildcard *p₁ toinclude a location such as, for instance, “New York,” “Oregon,” or thelike. Yet, it is again to be appreciated that the claimed subject matteris not so limited.

Syntactic constraints included in the mixed query 108 restrictgrammatical construction of corresponding wildcards in the regularexpression 110. The following provides various examples of syntacticconstraint types. Again, in the below examples, *w₁ is a word wildcard,*p₁ is a phrase wildcard, and w₂ is a given word. However, it iscontemplated that other syntactic constraint types are intended to fallwithin the scope of the hereto appended claims.

By way of example, a syntactic constraint can restrict a correspondingwildcard to a given part of speech. For instance, POS(*w₁, ps) meansthat the word wildcard *w₁ is restricted to have a part-of-speech labelps. According to an illustration, POS(*w₁, noun) restricts the wordwildcard *w₁ to be a noun.

According to yet a further example, a syntactic constraint can restricta corresponding wildcard to a given set of words. For instance,OneOf(*w₁, (ConstantWord| . . . )) means that the word wildcard *w₁ isrestricted to be one of the enumerated words. By way of illustration,OneOf(*w₁, (formal|mature|refined)) restricts the word wildcard *w₁ tobe one of the three enumerated words in the set: “formal,” “mature,” or“refined.”

According to another example, a syntactic constraint can restrict acorresponding wildcard to a given parse-subtree tag. Parse(*p₁, nt)means that a parse tree covering the phrase wildcard *p₁ is restrictedto having a non-terminal tag nt. By way of illustration, Parse(*p₁,verb-phrase) restricts the parse tree covering the phrase wildcard *p₁to have a verb-phrase tag. Further, it is contemplated that in the casewhere the phrase wildcard *p₁ does not constitute a full subtree, thenthis constraint can fail.

In accordance with yet another example, a syntactic constraint canrestrict a corresponding wildcard to a maximum number of words. Forinstance, Short(*p₁) means that the phrase wildcard *p₁ is restricted toinclude less than a threshold number of words (e.g., less than fivewords, etc.).

According to an example, the mixed query 108 (Query Q) can be describedpursuant to the following formal language. It is contemplated, however,that the claimed subject matter is not limited to the example set forthbelow.

Query Q := (Regex R, Constraint C) Regex R := e₁ e₂ . . . e_(n) Elemente := w | p Word w := {ConstantWord_(i)}_(i) | *w_(i) Phrase p :={ConstantPhrase_(i)}_(i) | *p_(i) Constraint C := pd₁ & pd₂ & pd₃ &...pd_(x) Predicate pd := Synonym(*w₁, w₂) | Antonym(*w₁, w₂) |WordSense(*w₁, w₂, Sense) | POS(*w₁, ps) | OneOf(*w₁,(ConstantWord|...)) | Parse(*p₁, nt) | Short(*p₁) | Not(pd)In the foregoing semantic query language used to describe semantic andlexical constraints of the mixed query 108, Regex R is the regularexpression 110 and Constraint C are the constraints (e.g., the semanticconstraints including the semantic constraint 112 and the syntacticconstraints). The regular expression 110, Regex R, includes n elements(e.g., e₁, . . . , e_(n)), where n is substantially any positiveinteger. The n elements are in a pattern. Moreover, an element e can beeither a word (w) or a phrase (p). A word can be a constant word or aword wildcard (*w_(i)), and a phrase can be a constant phrase or aphrase wildcard (*p_(i)). Further, the constraints, Constraint C,include x predicates (e.g., x semantic constraints), where x issubstantially any positive integer. Each of the x predicates (e.g., pd₁,. . . , pd_(x)) can be a semantic constraint or a syntactic constraint.Constraint C can be a conjunction of the x predicates.

According to other examples, however, it is contemplated that theforegoing language need not be employed for the mixed query 108. Forinstance, the mixed query 108 may be formed using a natural languagesyntax; yet, the claimed subject matter is not so limited.

Now turning to FIG. 2, illustrated is a system 200 that executes themixed query 108 to retrieve the results 116 from the database 102retained in the data repository 104. The system 200 includes theinterface component 106 and the query execution component 114. Similarto above, the interface component 106 receives the mixed query 108,where the mixed query 108 includes the regular expression 110 andconstraints. The constraints include semantic constraints. Moreparticularly, the semantic constraints include at least acontext-independent semantic constraint 202 and a context-dependentsemantic constraint 204. For instance, the semantic constraint 112 ofFIG. 1 can be either the context-independent semantic constraint 202 orthe context-dependent semantic constraint 204; yet, the claimed subjectmatter is not so limited. Further, although not described in the belowexamples, it is contemplated that the constraints can also includesyntactic constraints; however, the claimed subject matter is not solimited.

As set forth above, the regular expression 110 is a pattern of elements.The elements in the regular expression 110 include at least a firstwildcard, a second wildcard, and an explicit lexical constraint (e.g., aconstant word, a constant phrase, or a disparate constant string ofcharacters). A first semantic constraint restricts a meaning of thefirst wildcard in the regular expression 110. The first semanticconstraint, for instance, can be the context-independent semanticconstraint 202. Moreover, a second semantic constraint restricts ameaning of the second wildcard in the regular expression 110. Forinstance, the second semantic constraint can be the context-dependentsemantic constraint 204.

As noted above, the terms “first” and “second” are not intended todenote an order. Accordingly, the first wildcard and the second wildcardcan respectively be positioned at substantially any location withrespect to each other within the pattern of elements. Moreover, thefirst semantic constraint and the second semantic constraint canrespectively be positioned at substantially any location with respect toeach other within the semantic constraints.

It is also to be appreciated that the regular expression 110 can includesubstantially any number of wildcards in addition to the first wildcardand the second wildcard. Moreover, it is contemplated that the regularexpression 110 can include substantially any number of additionalexplicit lexical constraints. Yet, the claimed subject matter is notlimited to the foregoing.

Further, it is contemplated that there need not be a one-to-onecorrespondence between wildcards and semantic constraints. For example,multiple semantic constraints can restrict a meaning of a particularwildcard (e.g., a particular semantic constraint can restrict theparticular wildcard to be a synonym of the word “derive” and a disparatesemantic constraint can restrict the particular wildcard to not be theword “determine,” etc.). By way of another example, it is contemplatedthat a semantic constraint can restrict meanings of multiple wildcards.

The semantic constraints of the mixed query 108 can include twodifferent types of semantic constraints, namely, those that arecontext-independent which can be expanded into lexical constraints (e.g.expanded lexical constraints), and those which are context-dependent(e.g., unable to be directly expanded into such lexical constraints).The context-independent semantic constraints can include Synonym andAntonym. For instance, synonyms and antonyms can be read in (e.g., froma file, etc.) and semantic constraints that include synonyms andantonyms can be expressed as elements of the regular expression 110. Thecontext-dependent semantic constraints can be WordSense and semanticconstraints using the Not operator. Such context-dependent semanticconstraints can depend on a context of a whole sentence and, therefore,can be applied as part of a filtering approach after candidate sentencesare identified rather than when identifying candidate sentences. Thus,the context-independent semantic constraint 202 can restrict the firstwildcard to be a synonym of a first given word or an antonym of thefirst given word. Further, the context-dependent semantic constraint 204can restrict the second wildcard to have a sense of a second word or canrestrict the second wildcard based on a negated semantic constraint.

The query execution component 114 can employ a matching procedure whenexecuting the mixed query 108 to retrieve the results 116 that match thepattern of the elements in the regular expression 110 and satisfy thesemantic constraints. More particularly, the query execution component114 can include a parse component 206. The parse component 206 can parsethe mixed query 108 into the regular expression 110 and the constraints.Further, the parse component 206 can identify the context-independentsemantic constraint 202 and the context-dependent semantic constraint204. Moreover, the query execution component 114 can include aconstraint expansion component 208 that expands the context-independentsemantic constraint 202 into an expanded lexical constraint. Theconstraint expansion component 208 can similarly expand othercontext-independent semantic constraint(s) included in the mixed query108 into expanded lexical constraint(s). According to an illustration,the constraint expansion component 208 can expand a Synonym constraintby reading in synonyms of a given word (e.g., from a file, etc.).Likewise, the constraint expansion component 208 can expand an Antonymconstraint by reading in antonyms of a given word (e.g., from a file,etc.).

The query execution component 114 can further include a candidateidentification component 210 that identifies candidate sentences fromthe database 102 that include words specified by the expanded lexicalconstraint and the explicit lexical constraint (as well as otherexpanded lexical constraint(s) and explicit lexical constraint(s), ifany). According to an example, the candidate identification component210 can identify the candidate sentences from the database 102 using aninverted word index 212. The inverted word index 212 can include amapping, for words included in the database 102, from a word to a set ofsentences that include the word. Hence, the candidate identificationcomponent 210 can use the inverted word index 212 to decrease latencywhen identifying candidate sentences from the database 102; yet, it iscontemplated that the claimed subject matter is not limited to theforegoing.

According to an example, the candidate identification component 210 canapply the expanded lexical constraint and the explicit lexicalconstraint in an order from most restrictive lexical constraint to leastrestrictive lexical constraint when identifying the candidate sentencesfrom the database 102 where such candidate sentences include the wordsspecified by the expanded lexical constraint and the explicit lexicalconstraint. By way of illustration, if a sentence includes three wordssuch as “forlorn,” “water,” and “is,” then the candidate identificationcomponent 210 can cause candidates sentences from the database 102 thatinclude “forlorn” to be collected first (e.g., resulting in a relativelysmall set). Therefore, the candidate sentences can be further refined(e.g., based on “water”), and so forth.

The query execution component 114 further includes a filter component214 that filters the candidate sentences from the database 102 based onwhether the candidate sentences match the pattern of the elements in theregular expression 110. Moreover, the filter component 214 can outputfiltered candidate sentences from the database 102 determined to matchthe elements in the regular expression 110. The filter component 214 canuse regular expression matching to find which of the candidate matchessatisfy the regular expression 110 and the expanded lexicalconstraint(s).

The query execution component 114 further includes a verificationcomponent 216 that can evaluate whether the filtered candidate sentencesfrom the database 102 satisfy the context-dependent semantic constraint204 (as well as other context-dependent semantic constraint(s), if any).The filtered candidate sentences determined by the verificationcomponent 216 to satisfy the context-dependent semantic constraint 204(and the other context-dependent semantic constraint(s)) can beretrieved by the query execution component 114 and outputted as theresults 116. Thus, the verification component 216 can employ a filteringtechnique that checks the remaining candidate matches to evaluatewhether such matches satisfy the context-dependent semantic constraints.

By way of another example, the query execution component 114 can furtheremploy a language model (e.g., N-gram language model, etc.). Thelanguage model can be used to score the results 116 outputted by thequery execution component 114. For instance, respective scores for theresults 116 can be outputted by the query execution component 114.According to another illustration, the scores can be compared to athreshold score to filter the results 116 outputted by the queryexecution component 114. However, it is to be appreciated that theclaimed subject matter is not limited to utilization of a languagemodel.

Moreover, it is contemplated that the mixed query 108 can includesyntactic constraint(s). It is to be appreciated that the syntacticconstraint(s) can be pre-computed and utilized in the foregoing matchingprocedure implemented by the query execution component 114. According toan example, whether to pre-compute the syntactic constraint(s) can be afunction of an amount of computer memory available, informationavailable in the database 102 being processed, a combination thereof,etc.

Although the foregoing embodiment describes that the constraintexpansion component 208 expands the context-independent semanticconstraints, such as Synonym and Antonym, into expanded lexicalconstraints and the candidate identification component 210 identifiescandidate sentences from the database 102 that include words specifiedby the expanded lexical constraints and the explicit lexical constraint,it is contemplated that the context-independent semantic constraints canadditionally or alternatively be utilized by the verification component216. For instance, a degree of similarity or oppositeness can becomputed by the verification component 216 for Synonym or Antonymconstraints. Accordingly, the verification component 216 can determinewhether such constraints are met by comparing the degree of similarityor the degree of oppositeness to threshold values. Yet, it iscontemplated that the claimed subject matter is not limited to theforegoing example.

The following sets forth an example of query execution performed by thequery execution component 114. It is to be appreciated that the belowexample is provided for illustration purposes, and the claimed subjectmatter is not intended to be limited to such example.

According to this example, the mixed query 108 executed by the queryexecution component 114 can be the following:Q(w)=(*w ₁ *p ₁ as w*w ₂ *p ₂ ,C)

-   -   where C=Synonym(*w₁, characterized) and Synonym(*w₂, because)        and OneOf(w, (mercurial)) and Parse(*p₂, S)        The mixed query 108, Q(w), can be received by the interface        component 106. Moreover, the query execution component 114 can        execute such query. More particularly, the parse component 206        can parse the mixed query 108, Q(w), into the regular        expression, *w₁*p₁ as w*w₂*p₂, and the constraints, C.

The constraint expansion component 208 can expand context-independentsemantic constraints into expanded lexical constraints. In the foregoingexample, the Synonym constraints can be expanded. Accordingly, a firstword wildcard *w₁, which is restricted to be a synonym of“characterized,” can be expanded to(characterized|described|defined|portrayed) (e.g., the first wordwildcard *w₁ can be restricted to be “characterized,” “described,”“defined,” or “portrayed”). Further, a second word wildcard *w₂, whichis restricted to be a synonym of “because,” can be expanded to(because|since|considering) (e.g., the second word wildcard *w₂ can berestricted to be “because,” “since,” or “considering).

Accordingly, the candidate identification component 210 can identifycandidate sentences from the database 102 that include(characterized|described|defined|portrayed) &(because|since|considering) & (mercurial). It is to be noted that thisis a conjunction of disjunctions. The candidate identification component210 can use the inverted word index 212 to identify candidate sentencesfrom the database 102. For instance, the candidate identificationcomponent 210 can evaluate each part of the conjunction set forth above,and collect indexes of sentences that include one of the words. Forexample, the sentences satisfying the three respective constraints maybe associated with the following sets of indexes: {18, 234, 63, 12,763}, {18, 44, 585, 763, 12}, {18, 763, 12, 800}. Accordingly, thecandidate identification component 210 can find that sentences thatsatisfy the three foregoing constraints by determining the intersectionof the foregoing sets of indexes, which results in {18, 763, 12}.

Moreover, the filter component 214 can use regular expression matchingto find potential matches that satisfy the regular expression 110 andthe pre-expanded semantic constraints. Accordingly, following the abovenoted example, the regular expression to be matched by the filtercomponent 214 (employing standard notation) is as follows:(characterized|described|defined|portrayed) (\w+\s+)+as mercurial(because|since|considering) (\w+\s+)+. According to an illustration,perhaps sentence 18 includes “because” preceding “characterized,” whichfails to match the above regular expression. Accordingly, sentences{763, 12} can remain as candidate sentences after the filtering by thefilter component 214.

Moreover, the verification component 216 can check the remainingcandidate sentences to analyze whether such candidate sentences satisfythe context-dependent semantic constraints. Similarly, context-dependentsyntactic constraints can be analyzed by the verification component 216.In the continuing example, the constraints include a context-dependentsyntactic constraint (e.g., Parse(*p₂, S)). Thus, the phrase at the endof the sentence (e.g., after the synonym of “because”) is restricted toconstituting a sentence. For instance, sentence 763 may recite thefollowing: “He was characterized as mercurial because of it.” In suchcase, the final words “because of it” parse to a prepositional phase,and such candidate sentence can be rejected by the verificationcomponent 216 due to the parse tag being set for phrase *p₂ as asentence. Moreover, sentence 12 may recite the following: “Willy's moodcan be described as mercurial since it is always changing either towardshis wife or sons.” Following this illustration, since sentence 12includes “it is always changing either towards his wife or sons” after“since,” the verification component 216 can determine that sentence 12satisfies the context-dependent syntactic constraint.

Turning to FIG. 3, illustrated is a system 300 that implements anapplication that employs mixed queries to search the database 102retained in the data repository 104. The system 300 includes anapplication component 302 that controls a set of mixed queries outputtedfor the application. For instance, the application can be an interactivelanguage tutoring application. According to another example, theapplication can be a question answering application. Yet, it iscontemplated that other types of applications are intended to fallwithin the scope of the hereto appended claims.

The application component 302 can control the set of mixed queriesoutputted for the application as noted above. A particular mixed queryin the set of mixed queries can include a common regular expression anda variable constraint. The mixed query can be a parameterized query(e.g., the mixed query can be run multiple times on different choicesfor a parameter, namely, the variable constraint). The variableconstraint can be a function of the particular mixed query in the set.Accordingly, disparate mixed queries in the set can be associated withdiffering variable constraints. Moreover, the disparate mixed queries inthe set can include the common regular expression, where the commonregular expression is a pattern of elements.

The interface component 106 can receive the set of mixed queries fromthe application component 302. Further, the query execution component114 can execute the set of mixed queries to retrieve, from the database102 in the data repository 104, respective results that match thepattern of the elements in the common regular expression and satisfy thevariable constraint for each of the mixed queries in the set. Theinterface component 106 can return the respective results for each ofthe mixed queries in the set to the application component 302. Moreover,the application component 302 can utilize the respective results for theapplication.

According to an example, the application can be an interactive languagetutoring application. Following this example, the application component302 can control the variable constraint to restrict the meaning of thefirst wildcard to be a particular word in a first mixed query in theset. Moreover, the application component 302 can generate a sentencefrom the respective results corresponding to the first mixed query giventhe pattern of the elements and the particular word. The applicationcomponent 302 can also control the variable constraint to restrict themeaning of the first wildcard to be an antonym of the particular word ina second mixed query in the set. Following this example, the applicationcomponent 302 can generate an incorrect alternative word for thesentence from the respective results corresponding to the second mixedquery. By way of further illustration, the application component 302 cancontrol the variable constraint to restrict the meaning of the firstwildcard to be inhibited from being a synonym of the particular word ina third mixed query in the set (e.g., the variable constraint can beNot(Synonym(particular word))). Hence, the application component 302 cangenerate an incorrect alternative word for the sentence from therespective results corresponding to the third mixed query.

According to another example, incorrect alternative words can be chosenfrom amongst words in a specific position within a set of sentences fromthe database 102. The incorrect alternative words can be chosen based onthe common regular expression and the variable constraint. Thus, querieswith weak constraints can be used to generate incorrect alternativewords (e.g., distractors) for sentence completion questions. By way ofillustration, a first mixed query in the set can search for “John *w1art” with a semantic constraint such as Synonym(*w1, learned), which canreturn the sentence “John mastered art.” Following this illustration, asecond mixed query in the set can be a simpler query such as “John *w1”with a semantic constraint such as Not(Synonym(*w1, learned).Accordingly, words in the specific position within the set of sentencesfrom the database 102 can include, for instance, “scratches,” “ran,”“smelled,” “bit,” and so forth. In contrast, conventional approachescommonly rearrange an original sentence, and thereafter generateincorrect alternative words based on the re-arrangement.

The following provides an illustration of the interactive languagetutoring application implemented by the application component 302; yet,it is to be appreciated that the claimed subject matter is not limitedto such illustration.

Suppose the application component 302 gives a student the followingsentence completion question, and the student incorrectly answers“mercurial.”

-   -   The principal characterized his pupils as ______ because they        were pampered and spoiled by their indulgent parents.    -   (a) cosseted    -   (b) disingenuous    -   (c) corrosive    -   (d) laconic    -   (e) mercurial

Following this illustration, since the student mistakenly answered“mercurial,” the application component 302 can test “mercurial” in asimilar sentence. Accordingly, the application component 302 cangenerate the following mixed query to retrieve sentences from thedatabase 102 that are similar:Q(w)=(*w ₁ *p ₁ as w*w ₂ ,C)

-   -   where C=Synonym(*w₁, characterized) and Synonym(*w₂, because)        and OneOf(w, (mercurial))

In the above mixed query, *w₁ and *w₂ are word wildcards, and *p₁ is aphrase wildcard. Semantically, *w₁ is constrained to be a synonym of“characterized” and *w₂ is constrained to be a synonym of “because.”Moreover, w is a word variable (e.g., variable constraint), which isconstrained to be “mercurial” in this mixed query. The foregoing querycan result in the following sentence being returned (e.g., in theresults): “Willy's mood can be described as mercurial since it is alwayschanging either towards his wife or sons.” Note that neither the word“characterized” nor the word “because” is present in the returnedsentence. Accordingly, the application component 302 can use thereturned sentence to form another sentence completion question for thestudent. An example of such sentence completion question is as follows:

-   -   Willy's mood can be described as ______ since it is always        changing either towards his wife or sons.    -   (a) mercurial    -   (b) . . . (e)

Moreover, answers (b) through (e) can be incorrect alternative wordsgenerated by the application component 302 as set forth above.

According to another example, the application can be a questionanswering application. Following this example, the application component302 can control the variable constraint to restrict the meaning of thefirst wildcard to be a first word or phrase in a first mixed query inthe set, and can control the variable constraint to restrict the meaningof first wildcard to be a second word or phrase in a second mixed queryin the set. Following this example, the application component 302 candetermine a first answer associated with the first word or phrase fromthe respective results corresponding to the first mixed query. Further,the application component 302 can determine a second answer associatedwith the second word or phrase from the respective results correspondingto the second mixed query.

The following provides another illustration; in such illustration, aquestion answering application is implemented by the applicationcomponent 302. However, it is to be appreciated that the claimed subjectmatter is not limited to such illustration.

Suppose a user wants to map each person's name in a spreadsheet columnto an institute from which he or she obtained his or her Phd.Accordingly, the application component 302 can generate the followingmixed query to receive the desired information for a person whose nameis w.Q(w)=(w*p ₁ *w ₁ his/her Phd*p ₂ *w ₂ *p ₃ ,C)

-   -   where C=Synonym(*w₁, received) and POS(*w₂, from)        In the foregoing mixed query, *p₁ may represent some filler text        between the name of the person and some sentence that contains        the desired information (possibly within a biography paragraph).        Further, *w₁ may match words like “received”, “finished,”        “earned,” and “obtained.” Moreover, *w₂ may match words like        “from,” “at,” “in,” and “with.” *p₂ may match an area in which        the Phd was obtained, while *p₃ may bind to the institute from        which the Phd was obtained.

Now turning to FIG. 4, illustrated is a system 400 that iterativelygenerates the mixed query 108. The interface component 106 can receivean initial mixed query that includes a regular expression and a set ofconstraints (e.g., semantic constraints and/or syntactic constraints).The regular expression, as noted herein, is a pattern of elements.Further, the query execution component 114 can execute the initial mixedquery to retrieve the results 116 from the database 102 that match thepattern of the elements in the regular expression and satisfy the set ofconstraints. Moreover, the interface component 106 can cause the results116 to be displayed on a display screen 402, for instance.

Feedback 404 related to the results 116 can be received by the interfacecomponent 106. For instance, the feedback 404 can specify a subset ofthe results 116 that are undesirably retrieved in response to theinitial mixed query. Further, the feedback 404 can specify a set ofmissing results that are undesirably omitted from the results 116retrieved in response to the initial mixed query.

The system 400 further includes a query refinement component 406 thatutilizes the feedback 404 to automatically generate a refined mixedquery. The refined mixed query can be automatically generated by thequery refinement component 406 based on a user indicating which of theresults 116 returned by the execution of a previous version of the mixedquery were not desirable and/or results undesirably missing from theprevious results 116 returned by the execution of the previous versionof the mixed query. For instance, the query refinement component 406 canperform programming by example; however, the claimed subject matter isnot so limited. Moreover, the construction of the refined mixed querycan continue until the user is satisfied with the results 116 generatedby the query execution component 114.

The interface component 106 can receive the refined mixed query. Forinstance, the regular expression and/or the set of constraints can berefined responsive to the results 116 to construct the refined mixedquery. Moreover, the query execution component 114 can execute therefined mixed query to retrieve updated results from the database 102that match the pattern of the elements in the regular expression andsatisfy the set of constraints as refined. Moreover, the interfacecomponent 106 can cause the updated results to be displayed on thedisplay screen 402.

According to another embodiment (not shown), a user can interactivelyconstruct the initial mixed query and can possibly refine the initialmixed query based on the results 116 rendered on the display screen 402.Thus, the user can manually generate the refined mixed queries. It iscontemplated, however, that the claimed subject matter is not solimited.

Iterative query generation can be utilized for parameterized queriessince such queries may be run multiple times on different choices for aparameter. For instance, the parameterized queries can be used inconnection with an application executed by the application component 302of FIG. 3; yet, the claimed subject matter is not so limited.

FIGS. 5-7 illustrate exemplary methodologies relating to executing amixed query to search a database. While the methodologies are shown anddescribed as being a series of acts that are performed in a sequence, itis to be understood and appreciated that the methodologies are notlimited by the order of the sequence. For example, some acts can occurin a different order than what is described herein. In addition, an actcan occur concurrently with another act. Further, in some instances, notall acts may be required to implement a methodology described herein.

Moreover, the acts described herein may be computer-executableinstructions that can be implemented by one or more processors and/orstored on a computer-readable medium or media. The computer-executableinstructions can include a routine, a sub-routine, programs, a thread ofexecution, and/or the like. Still further, results of acts of themethodologies can be stored in a computer-readable medium, displayed ona display device, and/or the like.

FIG. 5 illustrates a methodology 500 of searching a database retained ina data repository. At 502, a mixed query that comprises a regularexpression and a semantic constraint can be received. The regularexpression is a pattern of elements. Further, the elements in theregular expression include a first wildcard and at least one of anexplicit lexical constraint or a second wildcard. Moreover, it iscontemplated that the elements in the regular expression can includeother wildcards and/or other explicit lexical constraints. At 504, themixed query can be executed. For instance, at least one processor on atleast one computing device can be utilized to execute the mixed query.The mixed query can be executed to retrieve results that match a patternof elements in the regular expression and satisfy the semanticconstraint. Accordingly, the results can be retrieved from the databaseretained in the data repository.

With reference to FIG. 6, illustrated is a methodology 600 of executinga mixed query. At 602, the mixed query can be parsed into a regularexpression and constraints. The constraints include semanticconstraints. The semantic constraints can include context-independentsemantic constraint(s) and context-dependent semantic constraint(s).Further, the constraints can include syntactic constraints.

At 604, a context-independent semantic constraint can be expanded intoan expanded lexical constraint. At 606, candidate sentences from adatabase that include words specified by the expanded lexical constraintand an explicit lexical constraint can be identified. At 608, thecandidate sentences from the database can be filtered based on whetherthe candidate sentences match a pattern of elements in the regularexpression. Accordingly, filtered candidate sentences from the databasecan be outputted via such filtering. At 610, an evaluation can beperformed concerning whether the filtered candidate sentences from thedatabase satisfy a context-dependent semantic constraint. At 612, thefiltered candidate sentences from the database that satisfy thecontext-dependent semantic constraint can be retrieved as results. Suchresults can be displayed on a display screen, included in a database, oroutputted in substantially any other manner.

Referring now to FIG. 7, illustrated is a methodology 700 ofinteractively generating and executing a mixed query. At 702, a mixedquery that comprises a regular expression and a set of constraints canbe received. The set of constraints includes semantic constraints, forexample. At 704, the mixed query can be executed to retrieve resultsfrom a database that match the pattern of the elements in the regularexpression and satisfy the set of constraints. At 706, the results canbe displayed on a display screen. Accordingly, when displayed, theresults can be verified (e.g., by a user, etc.). At 708, the mixed querycan be refined. For example, the mixed query can be manually refined bya user. According to another example, the mixed query can beautomatically refined; such automatic refinement of the mixed query canbe based on feedback received from the user. The feedback can specify asubset of the results that are undesirably retrieved in response to aprevious mixed query. Moreover, the feedback can specify a set ofmissing results that are undesirably omitted from the results retrievedin response to the previous mixed query. The methodology 700 cancontinue with the mixed query continuing to be refined for substantiallyany number of iterations (e.g., until the results are verified by theuser, etc.).

Referring now to FIG. 8, a high-level illustration of an exemplarycomputing device 800 that can be used in accordance with the systems andmethodologies disclosed herein is illustrated. For instance, thecomputing device 800 may be used in a system that generates and executesa mixed query to search for results from a database. By way of anotherexample, the computing device 800 can be used in a system thatimplements an application that uses results returned responsive to amixed query. The computing device 800 includes at least one processor802 that executes instructions that are stored in a memory 804. Theinstructions may be, for instance, instructions for implementingfunctionality described as being carried out by one or more componentsdiscussed above or instructions for implementing one or more of themethods described above. The processor 802 may access the memory 804 byway of a system bus 806. In addition to storing executable instructions,the memory 804 may also store a database, a mixed query, results, and soforth.

The computing device 800 additionally includes a data store 808 that isaccessible by the processor 802 by way of the system bus 806. The datastore 808 may include executable instructions, a database, a mixedquery, results, etc. The computing device 800 also includes an inputinterface 810 that allows external devices to communicate with thecomputing device 800. For instance, the input interface 810 may be usedto receive instructions from an external computer device, from a user,etc. The computing device 800 also includes an output interface 812 thatinterfaces the computing device 800 with one or more external devices.For example, the computing device 800 may display text, images, etc. byway of the output interface 812.

It is contemplated that the external devices that communicate with thecomputing device 800 via the input interface 810 and the outputinterface 812 can be included in an environment that providessubstantially any type of user interface with which a user can interact.Examples of user interface types include graphical user interfaces,natural user interfaces, and so forth. For instance, a graphical userinterface may accept input from a user employing input device(s) such asa keyboard, mouse, remote control, or the like and provide output on anoutput device such as a display. Further, a natural user interface mayenable a user to interact with the computing device 800 in a manner freefrom constraints imposed by input device such as keyboards, mice, remotecontrols, and the like. Rather, a natural user interface can rely onspeech recognition, touch and stylus recognition, gesture recognitionboth on screen and adjacent to the screen, air gestures, head and eyetracking, voice and speech, vision, touch, gestures, machineintelligence, and so forth.

Additionally, while illustrated as a single system, it is to beunderstood that the computing device 800 may be a distributed system.Thus, for instance, several devices may be in communication by way of anetwork connection and may collectively perform tasks described as beingperformed by the computing device 800.

As used herein, the terms “component” and “system” are intended toencompass computer-readable data storage that is configured withcomputer-executable instructions that cause certain functionality to beperformed when executed by a processor. The computer-executableinstructions may include a routine, a function, or the like. It is alsoto be understood that a component or system may be localized on a singledevice or distributed across several devices.

Further, as used herein, the term “exemplary” is intended to mean“serving as an illustration or example of something.”

Various functions described herein can be implemented in hardware,software, or any combination thereof. If implemented in software, thefunctions can be stored on or transmitted over as one or moreinstructions or code on a computer-readable medium. Computer-readablemedia includes computer-readable storage media. A computer-readablestorage media can be any available storage media that can be accessed bya computer. By way of example, and not limitation, suchcomputer-readable storage media can comprise RAM, ROM, EEPROM, CD-ROM orother optical disk storage, magnetic disk storage or other magneticstorage devices, or any other medium that can be used to carry or storedesired program code in the form of instructions or data structures andthat can be accessed by a computer. Disk and disc, as used herein,include compact disc (CD), laser disc, optical disc, digital versatiledisc (DVD), floppy disk, and blu-ray disc (BD), where disks usuallyreproduce data magnetically and discs usually reproduce data opticallywith lasers. Further, a propagated signal is not included within thescope of computer-readable storage media. Computer-readable media alsoincludes communication media including any medium that facilitatestransfer of a computer program from one place to another. A connection,for instance, can be a communication medium. For example, if thesoftware is transmitted from a web site, server, or other remote sourceusing a coaxial cable, fiber optic cable, twisted pair, digitalsubscriber line (DSL), or wireless technologies such as infrared, radio,and microwave, then the coaxial cable, fiber optic cable, twisted pair,DSL, or wireless technologies such as infrared, radio and microwave areincluded in the definition of communication medium. Combinations of theabove should also be included within the scope of computer-readablemedia.

Alternatively, or in addition, the functionally described herein can beperformed, at least in part, by one or more hardware logic components.For example, and without limitation, illustrative types of hardwarelogic components that can be used include Field-programmable Gate Arrays(FPGAs), Program-specific Integrated Circuits (ASICs), Program-specificStandard Products (ASSPs), System-on-a-chip systems (SOCs), ComplexProgrammable Logic Devices (CPLDs), etc.

What has been described above includes examples of one or moreembodiments. It is, of course, not possible to describe everyconceivable modification and alteration of the above devices ormethodologies for purposes of describing the aforementioned aspects, butone of ordinary skill in the art can recognize that many furthermodifications and permutations of various aspects are possible.Accordingly, the described aspects are intended to embrace all suchalterations, modifications, and variations that fall within the spiritand scope of the appended claims. Furthermore, to the extent that theterm “includes” is used in either the details description or the claims,such term is intended to be inclusive in a manner similar to the term“comprising” as “comprising” is interpreted when employed as atransitional word in a claim.

What is claimed is:
 1. A method of searching a database, comprising:displaying first results retrieved from the database responsiveexecuting to a mixed query, the mixed query comprises a regularexpression and a set of constraints, the regular expression defines apattern of elements and the set of constraints restricts results thatmatch the pattern of elements in the regular expression; receiving userprovided feedback that specifies a subset of the first results that areundesirably retrieved responsive to executing the mixed query or a setof missing results that are undesirably omitted from the first resultsretrieved responsive to executing the mixed query; subsequent to themixed query being executed, automatically refining the mixed queryperformed by a processor of a computing device based on the userprovided feedback that specifies the subset of the first results thatare undesirably retrieved responsive to executing the mixed query or theset of the missing results that are undesirably omitted from the firstresults retrieved responsive to executing the mixed query to generate arefined mixed query, wherein automatically refining the mixed querycomprises automatically refining at least one of the regular expressionor the set of the constraints for the refined mixed query based on theuser provided feedback that specifies the subset of the first resultsthat are undesirably retrieved responsive to executing the mixed queryor the set of the missing results that are undesirably omitted from thefirst results retrieved responsive to executing the mixed query; anddisplaying second results retrieved from the database responsive toexecuting the refined mixed query, the second results retrieved from thedatabase match the pattern of elements in the regular expression andsatisfy the set of constraints of the refined mixed query.
 2. The methodof claim 1, wherein: the elements in the regular expression comprise awildcard; and the set of constraints comprises a semantic constraint,the semantic constraint includes a restriction to a meaning of a matchreturned responsive to the wildcard.
 3. The method of claim 2, whereinthe semantic constraint restricts the meaning of the match returnedresponsive to the wildcard to a specified sense of a given word.
 4. Themethod of claim 2, wherein the semantic constraint restricts the meaningof the match returned responsive to the wildcard to be a name of ageographic location.
 5. The method of claim 2, wherein the semanticconstraint restricts the meaning of the match returned responsive to thewildcard to one of a synonym of a given word, an antonym of the givenword, or based on a negated semantic constraint.
 6. The method of claim2, wherein the set of constraints further comprises a syntacticconstraint that restricts a grammatical construction of the wildcard. 7.The method of claim 2, wherein the set of constraints further comprisesa differing semantic constraint, the differing semantic constraintincludes a differing restriction to the meaning of the match returnedresponsive to the wildcard.
 8. The method of claim 2, wherein theelements in the regular expression further comprise at least one of anexplicit lexical constraint or a disparate wildcard.
 9. The method ofclaim 1, further comprising: executing mixed queries to retrieverespective results from the database, the mixed queries comprise theregular expression of the refined mixed query and respective variableconstraints, the respective results match the pattern of the elements inthe regular expression and satisfy the respective variable constraintsof the mixed queries.
 10. The method of claim 9, wherein the mixedqueries comprise: a particular mixed query, the particular mixed querycomprises the regular expression of the refined mixed query and avariable constraint that is a function of the particular mixed query;and a differing mixed query, the differing mixed query comprises theregular expression of the refined mixed query and a differing variableconstraint that is a function of the differing mixed query.
 11. Themethod of claim 9, further comprising: controlling the respectivevariable constraints for each of the mixed queries.
 12. The method ofclaim 1, further comprising: executing the refined mixed query toretrieve the second results, wherein executing the refined mixed querycomprises: identifying candidate results from the database; filteringthe candidate results from the database based on whether the candidateresults match the pattern of elements in the regular expression;evaluating whether the candidate results as filtered satisfy at leastone of the constraints in the set; and retrieving the candidate resultsas filtered that satisfy the at least one of the constraints in the set.13. The method of claim 12, wherein the candidate results are identifiedfrom the database using an inverted word index.
 14. A system,comprising: at least one processor; and memory that comprisescomputer-executable instructions that, when executed by the at least oneprocessor, cause the at least one processor to perform acts including:causing first results retrieved responsive to executing a mixed query tobe displayed, the mixed query comprises a regular expression and a setof constraints, the regular expression defines a pattern of elements andthe set of constraints restricts results that match the pattern ofelements in the regular expression; receiving feedback that specifies asubset of the first results that are undesirably retrieved responsive toexecuting the mixed query; subsequent to mixed query being executed,automatically generating a refined mixed query from the mixed queryperformed by the at least one processor based on the feedback thatspecifies the subset of the first results that are undesirably retrievedresponsive to executing the mixed query, wherein automaticallygenerating the refined mixed query comprises automatically refined atleast one of the regular expression or the set of constraints for therefined mixed query based on the feedback that specifies the subset ofthe first results that are undesirably retrieved responsive to executingthe mixed query; and causing second results retrieved responsive toexecuting the refined mixed query to be displayed, the second resultsmatch the pattern of elements in the regular expression and satisfy theset of constraints of the refined mixed query.
 15. The system of claim14, wherein the feedback further specifies a set of missing results thatare undesirably omitted from the first results retrieved responsive tothe mixed query, and the refined mixed query further being automaticallygenerated based on the feedback that specifies the set of the missingresults that are undesirably omitted from the first results retrievedresponsive to the mixed query.
 16. The system of claim 14, wherein: theelements in the regular expression comprise a wildcard; and the set ofconstraints comprises a semantic constraint, the semantic constraintincludes a restriction to a meaning of a match returned responsive tothe wildcard.
 17. The system of claim 16, wherein the semanticconstraint restricts the meaning of the match returned responsive to thewildcard to be a name of a geographic location.
 18. The system of claim14, wherein the memory further comprises computer-executableinstructions that, when executed by the at least one processor, causethe at least one processor to perform acts including: executing mixedqueries to retrieve respective results, the mixed queries comprise theregular expression of the refined mixed query and respective variableconstraints, the respective results match the pattern of the elements inthe regular expression and satisfy the respective variable constraintsof the mixed queries.
 19. A method, comprising: receiving user providedfeedback that specifies a subset of results that are undesirablyretrieved responsive to executing an initial mixed query; subsequent tothe initial mixed query being executed, automatically generating arefined mixed query performed by a processor of a computing device basedon the user provided feedback that specifies the subset of the resultsthat are undesirably retrieved responsive to executing the initial mixedquery; controlling respective variable constraints for mixed queries,the respective variable constraints being controlled based on identitiesof the mixed queries such that a particular variable constraint is usedfor a particular mixed query and a differing variable constraint is usedfor a differing mixed query, the mixed queries comprise a common regularexpression from the refined mixed query and the respective variableconstraints, the common regular expression defines a pattern of elementsfor each of the mixed queries and the variable constraints respectivelyrestrict results that match the pattern of elements in the commonregular expression for the mixed queries; and executing the mixedqueries to retrieve respective results for each of the mixed queries,the respective results match the pattern of the elements in the commonregular expression and satisfy the respective variable constraints ofeach of the mixed queries.
 20. The method of claim 19, wherein: theelements in the common regular expression comprise a wildcard; and thevariable constraints of each of the mixed queries includes a restrictionto a meaning of a match returned responsive to the wildcard.